package com.auth.manager.pojo.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @version 1.0.0
 * @Date: 2022/4/28 20:37
 * @Author ZhuYouBin
 * @Description 用户-角色关系实体
 */
@Data
@NoArgsConstructor
@TableName(value = "sys_user_role_rela")
public class UserRoleRelation implements Serializable {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @NotBlank(message = "用户id不能为空")
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 角色id
     */
    @NotBlank(message = "角色id不能为空")
    @TableField(value = "rid")
    private Integer rid;

}
